import request from 'utils/request'

/**
 * 登录接口
 * @param data {{code, mobile}}
 * @returns {AxiosPromise}
 */
export function login(data) {
  return request({
    url: '/authorizations',
    method: 'POST',
    data
  })
}

/**
 * 获取个人资料
 * @returns {Promise<AxiosResponse<any>>}
 */
export const getProfile = () => request.get('/user/profile')
